<?php

namespace backend\modules\supplier\models;

use Yii;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
use backend\models\BackendController;

/**
 * 供应商系统的基控制器类
 */
class SupplierController extends BackendController {

    /**
     * @inheritdoc
     */
    public function behaviors() {
        return [
            'access' => [
                'class' => AccessControl::className(),
                'rules' => [
                    [
                        'actions' => ['login', 'error', 'frame', 'page'],
                        'allow' => true,
                    ],
                    [
                        'actions' => ['logout', 'index'],
                        'allow' => true,
                        'roles' => ['@'],
                    ],
                ],
            ],
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'logout' => ['post'],
                ],
            ],
        ];
    }


}
